home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / povray / scenes / level3 / wg5.pov < prev   
Text File  |  1994-03-08  |  4KB  |  199 lines

  1. // Persistence Of Vision raytracer version 2.0 sample file.
  2.  
  3. // Wine glass and chessboard
  4. // Image by Dan Farmer
  5. #include "colors.inc"
  6. #include "shapes.inc"
  7. #include "textures.inc"
  8.  
  9. camera {
  10.    location <50.0, 55.0, -75.0>
  11.    direction <0.0, 0.0, 2.0>
  12.    up  <0.0, 1.0, 0.0>
  13.    right <4/3, 0.0, 0.0>
  14.    look_at <-10.0, 18.0, 0.0>
  15. }
  16.  
  17. light_source { <10.0, 50.0, 50.0> colour White }
  18.  
  19. light_source { <-35.0, 30.0, -150.0> colour White }
  20.  
  21. #declare Glass = texture {
  22.    pigment { color red 1.0 green 1.0 blue 1.0 filter 1.0 }
  23.    finish {
  24.       ambient 0.0
  25.       diffuse 0.0
  26.       reflection 0.1
  27.       refraction 1.0
  28.       ior 1.33
  29.       phong 0.3
  30.       phong_size 90
  31.    }
  32. }
  33.  
  34. #declare Wine = color red 1.0 filter 0.85
  35.  
  36. #declare Liquid = finish {
  37.    reflection 0.05
  38.    refraction 1.0
  39.    ior 1.2
  40. }
  41.  
  42. #declare Bead = object {
  43.    sphere { <0, 0, 0>, 1 scale <1.65, 0.65, 1.65> }
  44.    texture { Glass2 }
  45. }
  46.  
  47. /*
  48.    Torus generated using Truman's Torus Generator 1.0 (c) 1991 Truman Brown
  49.    Torus specs:                                                                  
  50.       Major radius: 0.975000
  51.       Minor radius: 0.025000
  52.       Outer radius: 1.000000
  53.       Inner radius: 0.950000
  54. */
  55.  
  56. #declare Rim = quartic {
  57.    <  1.000000, 0.000000, 0.000000, 0.000000, 2.000000,
  58.       0.000000, 0.000000, 2.000000, 0.000000, -1.902500,
  59.       0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
  60.       0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
  61.       1.000000, 0.000000, 0.000000, 2.000000, 0.000000,
  62.       1.900000, 0.000000, 0.000000, 0.000000, 0.000000,
  63.       1.000000, 0.000000, -1.902500, 0.000000, 0.902500 >
  64.  
  65.    clipped_by { plane { -y, 0.0 } }
  66.    scale <15.0, 10.0, 15.0>
  67.    translate 24.0*y
  68.    texture { Gold_Texture }
  69. }
  70.  
  71. #declare Top = intersection {
  72.    plane { y, 1.0  }
  73.    object { QCone_Y }
  74.    object { QCone_Y scale <0.97, 1.0, 0.97> inverse }
  75.  
  76.    clipped_by { plane { y, 0.0  inverse } }
  77.    scale <15.0, 10.0, 15.0>
  78.    translate 14.0*y
  79.    texture { Glass }
  80. }
  81.  
  82. #declare Stem = object {
  83.    Cylinder_Y
  84.    clipped_by {
  85.       plane { y, -1.0 inverse }
  86.       plane { y,  1.0 }
  87.    }
  88.    scale <1.0, 12.0, 1.0>
  89.    translate 6.0*y
  90.    texture { Glass2 }
  91. }
  92.  
  93.  
  94. #declare Base = object {
  95.    QCone_Y
  96.    clipped_by {
  97.       plane { y, 0.0  }
  98.       plane { y, -1.0 inverse }
  99.    }
  100.    translate 1.0*y         /* This actually puts the base of the cone on y=0*/
  101.    scale <12.0, 3.25, 12.0>
  102.    translate <0.0, 0.0, 0.0> /*Does nothing: just for clarity */
  103.    texture { Glass2 }
  104. }
  105.  
  106. #declare Wine2 = intersection {
  107.    plane { y, 0.9 }
  108.    object { QCone_Y scale <0.95, 1.0, 0.95> }
  109.  
  110.    clipped_by { plane { y, 0.0  inverse } }
  111.    scale <14.9, 10.0, 14.9>
  112.    translate 14.0*y
  113.    texture {
  114.       finish { Liquid }
  115.       pigment { Wine }
  116.    }
  117. }
  118.  
  119. /* Ground plane */
  120. plane {
  121.    y, 0.0
  122.    texture {
  123.       finish { crand 0.2 }
  124.       pigment { RichBlue }
  125.    }
  126. }
  127.  
  128. #declare Frame = union {
  129.    object {
  130.       Disk_X    /* Front rounded edge */
  131.       scale <240.0, 4.5, 4.5>
  132.       translate<-120.0, 0.0, -120.0>
  133.    }
  134.    object {
  135.       Disk_Z    /* Left rounded edge */
  136.       scale <4.5, 4.5, 240.0>
  137.       translate <-120.0, 0.0, -120.0>
  138.    }
  139.    object {
  140.       Disk_X    /* Rear rounded edge */
  141.       scale <240.0, 4.5, 4.5>
  142.       translate<-120.0, 0.0, +120.0>
  143.    }
  144.    object {
  145.       Disk_Z    /* Right rounded edge */
  146.       scale <4.5, 4.5, 240.0>
  147.       translate <+120.0, 0.0, -120.0>
  148.    }
  149.  
  150.    texture { Silver_Texture }
  151. }
  152.  
  153. #declare ChessBoard = object {
  154.    Cube
  155.    scale <120.0, 4.0, 120.0>
  156.  
  157.    texture {
  158.       pigment {
  159.          White_Marble
  160.          scale <20.0, 1.0, 20.0>
  161.       }
  162.       finish { reflection 0.12 }
  163.    }
  164.    texture {
  165.       pigment {
  166.          checker color Black color White filter 1.0
  167.          scale <30.0, 4.001, 30.0>
  168.       }
  169.       finish { reflection 0.12 }
  170.    }
  171. }
  172.  
  173.  
  174. #declare WineGlass = union {
  175.    object { Rim   }
  176.    object { Wine2 }
  177.    object { Top   }
  178.    object { Bead  translate 14.5*y }
  179.    object { Bead  translate 10.0*y }
  180.    object { Bead  translate  7.0*y }
  181.    object { Bead  translate  3.0*y }
  182.    object { Stem  }
  183.    object { Base  }
  184.    bounded_by {
  185.       object { Disk_Y scale <15.5, 25.0 ,15.5> }
  186.    }
  187.    scale <1.0, 1.50, 1.0>
  188. }
  189.  
  190. union {
  191.    object { Frame }
  192.    object { ChessBoard }
  193.    translate <0.0, 4.0, 145.0>
  194. }
  195.  
  196. object { WineGlass }
  197.  
  198. /*End of file */
  199.